Skip to content

Reduce past note opening delay - #7072

Merged
ComputelessComputer merged 1 commit into
mainfrom
fix/preload-past-notes
Aug 24, 2026
Merged

Reduce past note opening delay#7072
ComputelessComputer merged 1 commit into
mainfrom
fix/preload-past-notes

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Preload selected session content before mounting the editor.


Note

Medium Risk
Changes when notes switch and can briefly serve cached session body before the live query. Navigation still proceeds if preload fails.

Overview
Reduces delay when opening past notes from the sidebar by prefetching session content before the editor mounts.

preloadSession runs the same SQLite session query as useSession, caches one result for 5s, and dedupes in-flight loads. While the live subscription is still starting, useSession returns that prefetched record.

Timeline session rows start preload on pointer-down/focus and wait for it before switching tabs, showing a spinner on the current row until then. Locked notes skip the hover preload.

Reviewed by Cursor Bugbot for commit dc5e7ad. Bugbot is set up for automated code reviews on this repo. Configure here.

Preload selected session content before mounting the editor.
@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for anarlog canceled.

Name Link
🔨 Latest commit dc5e7ad
🔍 Latest deploy log https://app.netlify.com/projects/anarlog/deploys/6a8c546405b5600008b53423

@ComputelessComputer
ComputelessComputer merged commit b51487b into main Aug 24, 2026
16 checks passed
@ComputelessComputer
ComputelessComputer deleted the fix/preload-past-notes branch August 24, 2026 14:28

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dc5e7ad. Configure here.

openCurrent({ id: sessionId, type: "sessions" });
setIsOpening(false);
}
}, [openCurrent, sessionId]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale open wins navigation race

Medium Severity

openSession always calls openCurrent in finally after preloadSession finishes, with no check that this click is still the latest one. A slower preload from an earlier row can finish after a newer click and switch the tab back to the wrong note.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dc5e7ad. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant